/*
 *
 * *******************************************************************
 *   @项目名称: BHex Android
 *   @文件名称: FeeBeanResponse.java
 *   @Date: 11/29/18 3:21 PM
 *   @Author: chenjun
 *   @Copyright（C）: 2018 BlueHelix Inc.   All rights reserved.
 *   注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的.
 *  *******************************************************************
 *
 */

package io.bhex.sdk.trade.bean;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import io.bhex.baselib.network.response.BaseResponse;
import io.bhex.sdk.account.UserInfo;

/**
 * 描   述：手续费  24h额度
 * ================================================
 */

public class FeeBeanResponse extends BaseResponse implements Serializable{

    /**
     * available : 19998.77
     * minQuantity : 0
     * dayQuota : 200000
     * usedQuota : 2
     * fee : 0.002
     * minMinerFee : 0
     * maxMinerFee : 0
     * suggestMinerFee : 0
     */

    private String available;
    private String minQuantity;
    private String dayQuota;
    private String usedQuota;
    private String fee;
    private String feeTokenId;
    private String convertRate;
    private String convertFee;
    private String feeTokenName;
    private String minMinerFee;
    private String maxMinerFee;
    private String suggestMinerFee;
    /**
     * platformFee : 0.002
     * brokerFee : 0.002
     * minerFeeTokenId : BTC
     * minerFeeTokenName : BTC
     */

    private String platformFee;
    private String brokerFee;
    private String minerFeeTokenId;
    private String minerFeeTokenName;
    private String refuseReason;
    private boolean allowWithdraw;
    private boolean needConvert;
    private boolean needAddressTag;
    //提币数量 手续费 到账金额小数位数
    private int minPrecision;
    private boolean needKycCheck;
    private BigDecimal needKycQuotaQuantity;    //需要kyc的估值币种数量 2
    private String needKycQuotaUnit;    //需要kyc的单位 eg. BTC
    private String needKycQuantity;    //需要kyc的单位 eg. BTC
    private String internalWithdrawFee;
    private boolean internalWithdrawHasFee;
    private String tokenType; //"ERC20_TOKEN" token 类型
    private String riskBalanceBtcValue;
    /**
     * isEOS : false
     * needKycQuotaQuantity : 0
     * riskBalance : [{"tokenId":"USDT","tokenName":"USDT","amount":"5900","btcAmount":"0.826354","reasonCode":"RISK_BALANCE_SUBJECT_OTC","reason":"购买法币","createdAt":"1578383230835"},{"tokenId":"USDT","tokenName":"USDT","amount":"700000000","btcAmount":"100000","reasonCode":"RISK_BALANCE_SUBJECT_OTC","reason":"购买法币","createdAt":"1576499575210"}]
     */

    private boolean isEOS;
    private List<RiskBalanceBean> riskBalance;


    public String getConvertRate() {
        return convertRate;
    }

    public void setConvertRate(String convertRate) {
        this.convertRate = convertRate;
    }

    public String getFeeTokenId() {
        return feeTokenId;
    }

    public void setFeeTokenId(String feeTokenId) {
        this.feeTokenId = feeTokenId;
    }

    public String getFeeTokenName() {
        return feeTokenName;
    }

    public void setFeeTokenName(String feeTokenName) {
        this.feeTokenName = feeTokenName;
    }

    public String getAvailable() {
        return available;
    }

    public void setAvailable(String available) {
        this.available = available;
    }

    public String getMinQuantity() {
        return minQuantity;
    }

    public void setMinQuantity(String minQuantity) {
        this.minQuantity = minQuantity;
    }

    public String getDayQuota() {
        return dayQuota;
    }

    public void setDayQuota(String dayQuota) {
        this.dayQuota = dayQuota;
    }

    public String getUsedQuota() {
        return usedQuota;
    }

    public void setUsedQuota(String usedQuota) {
        this.usedQuota = usedQuota;
    }

    public String getFee() {
        return fee;
    }

    public void setFee(String fee) {
        this.fee = fee;
    }

    public String getMinMinerFee() {
        return minMinerFee;
    }

    public void setMinMinerFee(String minMinerFee) {
        this.minMinerFee = minMinerFee;
    }

    public String getMaxMinerFee() {
        return maxMinerFee;
    }

    public void setMaxMinerFee(String maxMinerFee) {
        this.maxMinerFee = maxMinerFee;
    }

    public String getSuggestMinerFee() {
        return suggestMinerFee;
    }

    public void setSuggestMinerFee(String suggestMinerFee) {
        this.suggestMinerFee = suggestMinerFee;
    }

    public String getPlatformFee() {
        return platformFee;
    }

    public void setPlatformFee(String platformFee) {
        this.platformFee = platformFee;
    }

    public String getBrokerFee() {
        return brokerFee;
    }

    public void setBrokerFee(String brokerFee) {
        this.brokerFee = brokerFee;
    }

    public String getMinerFeeTokenId() {
        return minerFeeTokenId;
    }

    public void setMinerFeeTokenId(String minerFeeTokenId) {
        this.minerFeeTokenId = minerFeeTokenId;
    }

    public String getMinerFeeTokenName() {
        return minerFeeTokenName;
    }

    public void setMinerFeeTokenName(String minerFeeTokenName) {
        this.minerFeeTokenName = minerFeeTokenName;
    }

    public String getConvertFee() {
        return convertFee;
    }

    public void setConvertFee(String convertFee) {
        this.convertFee = convertFee;
    }

    public boolean isAllowWithdraw() {
        if(UserInfo.getUserInfo() != null && UserInfo.getUserInfo().whiteConfig != null)
            return UserInfo.getUserInfo().whiteConfig.canWithdraw;
        return allowWithdraw;
    }

    public void setAllowWithdraw(boolean allowWithdraw) {
        this.allowWithdraw = allowWithdraw;
    }

    public boolean isNeedAddressTag() {
        return needAddressTag;
    }

    public void setNeedAddressTag(boolean needAddressTag) {
        this.needAddressTag = needAddressTag;
    }

    public int getMinPrecision() {
        return minPrecision;
    }

    public void setMinPrecision(int minPrecision) {
        this.minPrecision = minPrecision;
    }

    public BigDecimal getNeedKycQuotaQuantity() {
        return needKycQuotaQuantity;
    }

    public void setNeedKycQuotaQuantity(BigDecimal needKycQuotaQuantity) {
        this.needKycQuotaQuantity = needKycQuotaQuantity;
    }

    public String getNeedKycQuotaUnit() {
        return needKycQuotaUnit;
    }

    public void setNeedKycQuotaUnit(String needKycQuotaUnit) {
        this.needKycQuotaUnit = needKycQuotaUnit;
    }

    public String getNeedKycQuantity() {
        return needKycQuantity;
    }

    public void setNeedKycQuantity(String needKycQuantity) {
        this.needKycQuantity = needKycQuantity;
    }

    public boolean isNeedKycCheck() {
        return needKycCheck;
    }

    public void setNeedKycCheck(boolean needKycCheck) {
        this.needKycCheck = needKycCheck;
    }

    public String getRefuseReason() {
        return refuseReason;
    }

    public void setRefuseReason(String refuseReason) {
        this.refuseReason = refuseReason;
    }

    public boolean isNeedConvert() {
        return needConvert;
    }

    public void setNeedConvert(boolean needConvert) {
        this.needConvert = needConvert;
    }

    public String getInternalWithdrawFee() {
        return internalWithdrawFee;
    }

    public void setInternalWithdrawFee(String internalWithdrawFee) {
        this.internalWithdrawFee = internalWithdrawFee;
    }

    public boolean isInternalWithdrawHasFee() {
        return internalWithdrawHasFee;
    }

    public void setInternalWithdrawHasFee(boolean internalWithdrawHasFee) {
        this.internalWithdrawHasFee = internalWithdrawHasFee;
    }

    public String getTokenType() {
        return tokenType;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public String getRiskBalanceBtcValue() {
        return riskBalanceBtcValue;
    }

    public void setRiskBalanceBtcValue(String riskBalanceBtcValue) {
        this.riskBalanceBtcValue = riskBalanceBtcValue;
    }

    public boolean isIsEOS() {
        return isEOS;
    }

    public void setIsEOS(boolean isEOS) {
        this.isEOS = isEOS;
    }

    public List<RiskBalanceBean> getRiskBalance() {
        return riskBalance;
    }

    public void setRiskBalance(List<RiskBalanceBean> riskBalance) {
        this.riskBalance = riskBalance;
    }

    public static class RiskBalanceBean implements Serializable {
        /**
         * tokenId : USDT
         * tokenName : USDT
         * amount : 5900
         * btcAmount : 0.826354
         * reasonCode : RISK_BALANCE_SUBJECT_OTC
         * reason : 购买法币
         * createdAt : 1578383230835
         */

        private String tokenId;
        private String tokenName;
        private String amount;
        private String btcAmount;
        private String reasonCode;
        private String reason;
        private String createdAt;

        public String getTokenId() {
            return tokenId;
        }

        public void setTokenId(String tokenId) {
            this.tokenId = tokenId;
        }

        public String getTokenName() {
            return tokenName;
        }

        public void setTokenName(String tokenName) {
            this.tokenName = tokenName;
        }

        public String getAmount() {
            return amount;
        }

        public void setAmount(String amount) {
            this.amount = amount;
        }

        public String getBtcAmount() {
            return btcAmount;
        }

        public void setBtcAmount(String btcAmount) {
            this.btcAmount = btcAmount;
        }

        public String getReasonCode() {
            return reasonCode;
        }

        public void setReasonCode(String reasonCode) {
            this.reasonCode = reasonCode;
        }

        public String getReason() {
            return reason;
        }

        public void setReason(String reason) {
            this.reason = reason;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }
    }
}
